package com.huice.day11;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;

import com.huice.Interface.Md5Tool;

public class HttpClient02 {
	
public static void main(String[] args) {
	System.out.println(createSign("<product-code-search-request><update-date-start>2016-10-01</update-date-start><start>1</start><end>50</end></product-code-search-request>","4a071cd838d7fbeec1225dd7d125be3a"));
}

public static String createSign(String para, String key){
	String source = null;
	if(para!=null){
		source = "para" + para + key; 
	}else{
		source = key;
	}
	return Md5Tool.getInstance().getLongToken(source, "UTF-8");
}

}
